c# max in 2d array row

86

c# max in 2d array row -

var max = Enumerable.Range(0, PlayerStats.GetLength(1)).Max(i => PlayerStats[1, i]);
//Enumerable.Range gets a range of sequential numbers from 0 to PlayerStats.GetLength(1),
//which represent the indexes of all the items in the second array of PlayerStats. 

Comments

Submit
0 Comments